/*****************************************************************************

File:   QuiltDatasInterfaceImport.java

Date          Build     Author        Version    Comments
27-Dec-12    P-20-20    dshah          $$1        Created

****************************************************************************/
package com.ptc.otkjavaexamples;
import com.ptc.pfc.pfcGeometry.*;
import com.ptc.cipjava.*;
import com.ptc.pfc.pfcSession.*;
import com.ptc.pfc.pfcCommand.*;
import com.ptc.pfc.pfcGlobal.*;
import com.ptc.pfc.pfcModel.*;
import com.ptc.pfc.pfcModelItem.*;
import com.ptc.pfc.pfcFeature.*;
import com.ptc.pfc.pfcSolid.*;
import java.io.*;

import com.ptc.pfc.pfcFamily.*;
import com.ptc.pfc.pfcServer.*;
import com.ptc.pfc.pfcWindow.*;
import com.ptc.wfc.wfcSolid.*;
import com.ptc.pfc.pfcBase.*;
import com.ptc.wfc.wfcModel.*;
import com.ptc.wfc.wfcGeometry.*;
import com.ptc.wfc.wfcSolid.*;
import com.ptc.wfc.wfcPart.*;
import com.ptc.pfc.pfcPart.*;
import com.ptc.pfc.pfcDimension.*;
import com.ptc.pfc.pfcAssembly.*;
import com.ptc.pfc.pfcSelect.*;
import com.ptc.pfc.pfcUnits.*;
import com.ptc.pfc.pfcObject.*;
import com.ptc.pfc.pfcUI.*;
import com.ptc.pfc.pfcRelations.*;
import com.ptc.pfc.pfcDetail.*;
import com.ptc.pfc.pfcDrawing.*;
import com.ptc.pfc.pfcView.*;
import com.ptc.pfc.pfcView2D.*;
import com.ptc.pfc.pfcModel2D.*;

class QuiltDatasInterfaceImport
{

	public QuiltDatasInterfaceImport()
	{
	}

	public static QuiltDatas OtkUtilQuiltDatasCreate()
	{
		try
		{
 	 QuiltDatas wQuiltDatas = QuiltDatas.create();
		int[] nums;
		WSurfaceDescriptors WQSurfaceDescs1 = WSurfaceDescriptors.create();

		ContourDescriptors WQS1_ContDescs1 = ContourDescriptors.create();
		intseq WQS1_EdgeIds1 = intseq.create();

		nums = new int [4];
		nums[0] = 87;
		nums[1] = 92;
		nums[2] = 90;
		nums[3] = 95;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WQS1_EdgeIds1, 4, nums);
		ContourDescriptor WQS1_ContDesc1 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WQS1_EdgeIds1);
		WQS1_ContDescs1.append(WQS1_ContDesc1);

		// SURFACE_CONE
		Vector3D  WQS1_XAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( -1.0 , 0.0 , 0.0 );
		Vector3D  WQS1_YAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , -1.0 , 0.0 );
		Vector3D  WQS1_ZAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Point3D  WQS1_origin1 = otkCreateIntfDataUtils.CreatePfcPoint3D( 90.35826204133532 , -179.59947889684963 , 4181.858149281818 );
		Matrix3D  WQS1_MatrixD1 = otkCreateIntfDataUtils.CreatePfcMatrix3D(-1.0,0.0,0.0,0.0,0.0,-1.0,0.0,0.0,0.0,0.0,1.0,0.0,90.35826204133532,-179.59947889684963,4181.858149281818,1.0); 
		Transform3D   WQS1_TransformD1 = pfcBase.Transform3D_Create(WQS1_MatrixD1);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WQS1_XAxis1, WQS1_YAxis1,WQS1_ZAxis1, WQS1_origin1, WQS1_TransformD1);


		UVParams  WQS1_UVParam11 = otkCreateIntfDataUtils.CreatePfcUVParams(3.078760800517997, -4183.358149281818);
		UVParams  WQS1_UVParam21 = otkCreateIntfDataUtils.CreatePfcUVParams(6.346017160251382, -4105.358149281818);
		UVOutline  WQS1_UVOutline1 = otkCreateIntfDataUtils.CreatePfcUVOutline(WQS1_UVParam11, WQS1_UVParam21);
		SurfaceExtents  WQS1_SurfaceExtents1 = pfcGeometry.SurfaceExtents_Create (WQS1_UVOutline1);
		WConeDescriptor  WQS1_ConeDesc1 = wfcGeometry.WConeDescriptor_Create(WQS1_SurfaceExtents1, SurfaceOrientation.SURFACEORIENT_OUTWARD, WQS1_TransformD1, 0.017453292519943295, 93, WQS1_ContDescs1); 


		WSurfaceDescriptor  WQS1_SurfDesc1 = (WSurfaceDescriptor)(WQS1_ConeDesc1);


		WQSurfaceDescs1.append(WQS1_SurfDesc1);



		ContourDescriptors WQS1_ContDescs2 = ContourDescriptors.create();
		intseq WQS1_EdgeIds2 = intseq.create();

		nums = new int [4];
		nums[0] = 86;
		nums[1] = 95;
		nums[2] = 89;
		nums[3] = 92;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WQS1_EdgeIds2, 4, nums);
		ContourDescriptor WQS1_ContDesc2 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WQS1_EdgeIds2);
		WQS1_ContDescs2.append(WQS1_ContDesc2);

		// SURFACE_CONE
		Vector3D  WQS1_XAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( -1.0 , 0.0 , 0.0 );
		Vector3D  WQS1_YAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , -1.0 , 0.0 );
		Vector3D  WQS1_ZAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , 1.0 );
		Point3D  WQS1_origin2 = otkCreateIntfDataUtils.CreatePfcPoint3D( 90.35826204133532 , -179.59947889684963 , 4181.858149281818 );
		Matrix3D  WQS1_MatrixD2 = otkCreateIntfDataUtils.CreatePfcMatrix3D(-1.0,0.0,0.0,0.0,0.0,-1.0,0.0,0.0,0.0,0.0,1.0,0.0,90.35826204133532,-179.59947889684963,4181.858149281818,1.0); 
		Transform3D   WQS1_TransformD2 = pfcBase.Transform3D_Create(WQS1_MatrixD2);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WQS1_XAxis2, WQS1_YAxis2,WQS1_ZAxis2, WQS1_origin2, WQS1_TransformD2);


		UVParams  WQS1_UVParam12 = otkCreateIntfDataUtils.CreatePfcUVParams(-0.06283185307179587, -4183.358149281818);
		UVParams  WQS1_UVParam22 = otkCreateIntfDataUtils.CreatePfcUVParams(3.204424506661589, -4105.358149281818);
		UVOutline  WQS1_UVOutline2 = otkCreateIntfDataUtils.CreatePfcUVOutline(WQS1_UVParam12, WQS1_UVParam22);
		SurfaceExtents  WQS1_SurfaceExtents2 = pfcGeometry.SurfaceExtents_Create (WQS1_UVOutline2);
		WConeDescriptor  WQS1_ConeDesc2 = wfcGeometry.WConeDescriptor_Create(WQS1_SurfaceExtents2, SurfaceOrientation.SURFACEORIENT_OUTWARD, WQS1_TransformD2, 0.017453292519943295, 91, WQS1_ContDescs2); 


		WSurfaceDescriptor  WQS1_SurfDesc2 = (WSurfaceDescriptor)(WQS1_ConeDesc2);


		WQSurfaceDescs1.append(WQS1_SurfDesc2);



		QuiltData WQuiltData1 = wfcGeometry.QuiltData_Create(WQSurfaceDescs1, 98);
		wQuiltDatas.append(WQuiltData1);


		WSurfaceDescriptors WQSurfaceDescs2 = WSurfaceDescriptors.create();

		ContourDescriptors WQS2_ContDescs1 = ContourDescriptors.create();
		intseq WQS2_EdgeIds1 = intseq.create();

		nums = new int [4];
		nums[0] = 224;
		nums[1] = 208;
		nums[2] = 225;
		nums[3] = 209;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WQS2_EdgeIds1, 4, nums);
		ContourDescriptor WQS2_ContDesc1 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WQS2_EdgeIds1);
		WQS2_ContDescs1.append(WQS2_ContDesc1);

		// SURFACE_CONE
		Vector3D  WQS2_XAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.8369701987210297E-16 , 1.0 , 0.0 );
		Vector3D  WQS2_YAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 1.0 , -1.8369701987210297E-16 , 0.0 );
		Vector3D  WQS2_ZAxis1 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , -1.0 );
		Point3D  WQS2_origin1 = otkCreateIntfDataUtils.CreatePfcPoint3D( 90.35826204133532 , -179.59947889684963 , 4181.858149281813 );
		Matrix3D  WQS2_MatrixD1 = otkCreateIntfDataUtils.CreatePfcMatrix3D(1.8369701987210297E-16,1.0,0.0,0.0,1.0,-1.8369701987210297E-16,0.0,0.0,0.0,0.0,-1.0,0.0,90.35826204133532,-179.59947889684963,4181.858149281813,1.0); 
		Transform3D   WQS2_TransformD1 = pfcBase.Transform3D_Create(WQS2_MatrixD1);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WQS2_XAxis1, WQS2_YAxis1,WQS2_ZAxis1, WQS2_origin1, WQS2_TransformD1);


		UVParams  WQS2_UVParam11 = otkCreateIntfDataUtils.CreatePfcUVParams(1.5079644737231002, 4105.358149281813);
		UVParams  WQS2_UVParam21 = otkCreateIntfDataUtils.CreatePfcUVParams(4.775220833456485, 4183.358149281815);
		UVOutline  WQS2_UVOutline1 = otkCreateIntfDataUtils.CreatePfcUVOutline(WQS2_UVParam11, WQS2_UVParam21);
		SurfaceExtents  WQS2_SurfaceExtents1 = pfcGeometry.SurfaceExtents_Create (WQS2_UVOutline1);
		WConeDescriptor  WQS2_ConeDesc1 = wfcGeometry.WConeDescriptor_Create(WQS2_SurfaceExtents1, SurfaceOrientation.SURFACEORIENT_INWARD, WQS2_TransformD1, 0.01745329251994332, 232, WQS2_ContDescs1); 


		WSurfaceDescriptor  WQS2_SurfDesc1 = (WSurfaceDescriptor)(WQS2_ConeDesc1);


		WQSurfaceDescs2.append(WQS2_SurfDesc1);



		ContourDescriptors WQS2_ContDescs2 = ContourDescriptors.create();
		intseq WQS2_EdgeIds2 = intseq.create();

		nums = new int [4];
		nums[0] = 225;
		nums[1] = 210;
		nums[2] = 224;
		nums[3] = 211;
		otkCreateIntfDataUtils.CreateEdgeIdArray(WQS2_EdgeIds2, 4, nums);
		ContourDescriptor WQS2_ContDesc2 = wfcGeometry.ContourDescriptor_Create(ContourTraversal.CONTOUR_TRAV_EXTERNAL, WQS2_EdgeIds2);
		WQS2_ContDescs2.append(WQS2_ContDesc2);

		// SURFACE_CONE
		Vector3D  WQS2_XAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( -6.123233995736766E-17 , -1.0 , 0.0 );
		Vector3D  WQS2_YAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( -1.0 , 6.123233995736766E-17 , 0.0 );
		Vector3D  WQS2_ZAxis2 = otkCreateIntfDataUtils.CreatePfcVector3D ( 0.0 , 0.0 , -1.0 );
		Point3D  WQS2_origin2 = otkCreateIntfDataUtils.CreatePfcPoint3D( 90.35826204133532 , -179.59947889684963 , 4181.858149281813 );
		Matrix3D  WQS2_MatrixD2 = otkCreateIntfDataUtils.CreatePfcMatrix3D(-6.123233995736766E-17,-1.0,0.0,0.0,-1.0,6.123233995736766E-17,0.0,0.0,0.0,0.0,-1.0,0.0,90.35826204133532,-179.59947889684963,4181.858149281813,1.0); 
		Transform3D   WQS2_TransformD2 = pfcBase.Transform3D_Create(WQS2_MatrixD2);


		otkCreateIntfDataUtils.CreatePfcTransform3D(WQS2_XAxis2, WQS2_YAxis2,WQS2_ZAxis2, WQS2_origin2, WQS2_TransformD2);


		UVParams  WQS2_UVParam12 = otkCreateIntfDataUtils.CreatePfcUVParams(1.5079644737231006, 4105.358149281813);
		UVParams  WQS2_UVParam22 = otkCreateIntfDataUtils.CreatePfcUVParams(4.775220833456485, 4183.358149281815);
		UVOutline  WQS2_UVOutline2 = otkCreateIntfDataUtils.CreatePfcUVOutline(WQS2_UVParam12, WQS2_UVParam22);
		SurfaceExtents  WQS2_SurfaceExtents2 = pfcGeometry.SurfaceExtents_Create (WQS2_UVOutline2);
		WConeDescriptor  WQS2_ConeDesc2 = wfcGeometry.WConeDescriptor_Create(WQS2_SurfaceExtents2, SurfaceOrientation.SURFACEORIENT_INWARD, WQS2_TransformD2, 0.01745329251994332, 233, WQS2_ContDescs2); 


		WSurfaceDescriptor  WQS2_SurfDesc2 = (WSurfaceDescriptor)(WQS2_ConeDesc2);


		WQSurfaceDescs2.append(WQS2_SurfDesc2);



		QuiltData WQuiltData2 = wfcGeometry.QuiltData_Create(WQSurfaceDescs2, 195);
		wQuiltDatas.append(WQuiltData2);


		return(wQuiltDatas);
		}
		catch (Exception e)
		{
		System.out.println(e);
		}
		return null;
	}
};
